import App from './App'


// 引入 uview 1.x
import uView from "uview-ui";
Vue.use(uView);

// 首页tabbar
import tabbar from '@/components/Tabbar/index'
Vue.component('Tabbar', tabbar)

//引入vuex
import store from './store'
//把vuex定义成全局组件
Vue.prototype.$store = store

// 引入过滤器
import * as filters from './common/utils/filter'
Object.keys(filters).forEach(key => {
	Vue.filter(key, filters[key])
})

// 引入公共方法
import {
	showToast,
	getWeek
} from '@/common/utils'
Vue.prototype.showToast = showToast
Vue.prototype.getWeek = getWeek

// 引入moment
import moment from 'moment'
Vue.prototype.moment = moment

// 引入字典接口
import {
	dictApi
} from '@/api/dict'
Vue.prototype.dictApi = dictApi

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif